#include "Input.h"

char* inputs(char* message)
{
	int messageCounter = 0;
	ZeroMemory(message,2048);
	while(true)
	{
		char key;
		key = _getch();
		if(key == 8)
		{
			messageCounter--;
			message[messageCounter] = '\0';
			_putch(key);
			_putch(' ');
			_putch(key);
			continue;
		}
		message[messageCounter] = key;
		if(key == '\n'||key == 13)
		{
			message[messageCounter] = 0;
			break;
		}
		messageCounter++;
		_putch(key);
	}
	return message;
}